package sv.gob.mtps.hr.model;

// Generated 10-29-2012 03:04:23 PM by Hibernate Tools 3.4.0.CR1

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * CatTituloAcademico generated by hbm2java
 */
@Entity
@Table(name = "cat_titulo_academico", schema = "new_rrhh")
public class CatTituloAcademico implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private int idGradoAcademico;
	private CatNivelAcademico catNivelAcademico;
	private String gradoAcademico;
	private Set<SferhEmpleadoXCatTituloAcademico> sferhEmpleadoXCatTituloAcademicos = new HashSet<SferhEmpleadoXCatTituloAcademico>(
			0);

	public CatTituloAcademico() {
	}

	public CatTituloAcademico(int idGradoAcademico,
			CatNivelAcademico catNivelAcademico) {
		this.idGradoAcademico = idGradoAcademico;
		this.catNivelAcademico = catNivelAcademico;
	}

	public CatTituloAcademico(
			int idGradoAcademico,
			CatNivelAcademico catNivelAcademico,
			String gradoAcademico,
			Set<SferhEmpleadoXCatTituloAcademico> sferhEmpleadoXCatTituloAcademicos) {
		this.idGradoAcademico = idGradoAcademico;
		this.catNivelAcademico = catNivelAcademico;
		this.gradoAcademico = gradoAcademico;
		this.sferhEmpleadoXCatTituloAcademicos = sferhEmpleadoXCatTituloAcademicos;
	}

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name = "id_grado_academico", unique = true, nullable = false)
	public int getIdGradoAcademico() {
		return this.idGradoAcademico;
	}

	public void setIdGradoAcademico(int idGradoAcademico) {
		this.idGradoAcademico = idGradoAcademico;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "id_nivel_academico", nullable = false)
	public CatNivelAcademico getCatNivelAcademico() {
		return this.catNivelAcademico;
	}

	public void setCatNivelAcademico(CatNivelAcademico catNivelAcademico) {
		this.catNivelAcademico = catNivelAcademico;
	}

	@Column(name = "grado_academico")
	public String getGradoAcademico() {
		return this.gradoAcademico;
	}

	public void setGradoAcademico(String gradoAcademico) {
		this.gradoAcademico = gradoAcademico;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "catTituloAcademico")
	public Set<SferhEmpleadoXCatTituloAcademico> getSferhEmpleadoXCatTituloAcademicos() {
		return this.sferhEmpleadoXCatTituloAcademicos;
	}

	public void setSferhEmpleadoXCatTituloAcademicos(
			Set<SferhEmpleadoXCatTituloAcademico> sferhEmpleadoXCatTituloAcademicos) {
		this.sferhEmpleadoXCatTituloAcademicos = sferhEmpleadoXCatTituloAcademicos;
	}

}
